package org.example.Utils;

import org.example.entity.PageInfo;
import org.springframework.data.domain.Page;

public class PageUtils {
    public static PageInfo convertPage(Page page){
        return new PageInfo()
                .setHasNextPage(page.hasNext())
                .setPageTotalElements(page.getNumberOfElements());
    }

}
